<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="TweenPlugin,com.greensock.plugins.TweenPlugin,VERSION,changeFactor" name="keywords">
<title>com.greensock.plugins.TweenPlugin</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'TweenPlugin - API Documentation';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?com/greensock/plugins/TweenPlugin.html&amp;com/greensock/plugins/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;TweenPlugin</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class TweenPlugin"); titleBar_setSubNav(true,true,false,false,false,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.greensock.plugins</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class TweenPlugin</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Subclasses</td><td><a href="../plugins/AutoAlphaPlugin.html">AutoAlphaPlugin</a>, <a href="../plugins/BezierPlugin.html">BezierPlugin</a>, <a href="../plugins/DynamicPropsPlugin.html">DynamicPropsPlugin</a>, <a href="../plugins/EndArrayPlugin.html">EndArrayPlugin</a>, <a href="../plugins/FastTransformPlugin.html">FastTransformPlugin</a>, <a href="../plugins/FilterPlugin.html">FilterPlugin</a>, <a href="../plugins/FramePlugin.html">FramePlugin</a>, <a href="../plugins/HexColorsPlugin.html">HexColorsPlugin</a>, <a href="../plugins/MotionBlurPlugin.html">MotionBlurPlugin</a>, <a href="../plugins/Physics2DPlugin.html">Physics2DPlugin</a>, <a href="../plugins/PhysicsPropsPlugin.html">PhysicsPropsPlugin</a>, <a href="../plugins/QuaternionsPlugin.html">QuaternionsPlugin</a>, <a href="../plugins/RoundPropsPlugin.html">RoundPropsPlugin</a>, <a href="../plugins/ScalePlugin.html">ScalePlugin</a>, <a href="../plugins/ScrollRectPlugin.html">ScrollRectPlugin</a>, <a href="../plugins/SetActualSizePlugin.html">SetActualSizePlugin</a>, <a href="../plugins/SetSizePlugin.html">SetSizePlugin</a>, <a href="../plugins/ShortRotationPlugin.html">ShortRotationPlugin</a>, <a href="../plugins/SoundTransformPlugin.html">SoundTransformPlugin</a>, <a href="../plugins/TintPlugin.html">TintPlugin</a>, <a href="../plugins/TransformAroundPointPlugin.html">TransformAroundPointPlugin</a>, <a href="../plugins/TransformMatrixPlugin.html">TransformMatrixPlugin</a>, <a href="../plugins/VisiblePlugin.html">VisiblePlugin</a>, <a href="../plugins/VolumePlugin.html">VolumePlugin</a></td>
</tr>
</table>
<p></p>
 TweenPlugin is the base class for all TweenLite/TweenMax plugins. <br /><br />
  
 <b>USAGE:</b><br />
 
  To create your own plugin, extend TweenPlugin and override whichever methods you need. Typically,
  you only need to override onInitTween() and the changeFactor setter. I'd recommend looking at a
  simple plugin like FramePlugin or ScalePlugin and using it as a template of sorts. There are a few 
  key concepts to keep in mind:
  <ol>
   <li> In the constructor, set this.propName to whatever special property you want your plugin to handle. </li>
   
   <li> When a tween that uses your plugin initializes its tween values (normally when it starts), a new instance 
     of your plugin will be created and the onInitTween() method will be called. That's where you'll want to 
     store any initial values and prepare for the tween. onInitTween() should return a Boolean value that 
     essentially indicates whether or not the plugin initted successfully. If you return false, TweenLite/Max 
     will just use a normal tween for the value, ignoring the plugin for that particular tween.</li>
     
   <li> The changeFactor setter will be updated on every frame during the course of the tween with a multiplier
     that describes the amount of change based on how far along the tween is and the ease applied. It will be 
     zero at the beginning of the tween and 1 at the end, but inbetween it could be any value based on the 
     ease applied (for example, an Elastic.easeOut tween would cause the value to shoot past 1 and back again before 
     the end of the tween). So if the tween uses the Linear.easeNone easing equation, when it's halfway finished,
     the changeFactor will be 0.5. </li>
     
   <li> The overwriteProps is an Array that should contain the properties that your plugin should overwrite
     when OverwriteManager's mode is AUTO and a tween of the same object is created. For example, the 
     autoAlpha plugin controls the "visible" and "alpha" properties of an object, so if another tween 
     is created that controls the alpha of the target object, your plugin's killProps() will be called 
     which should handle killing the "alpha" part of the tween. It is your responsibility to populate
     (and depopulate) the overwriteProps Array. Failure to do so properly can cause odd overwriting behavior.</li>
     
   <li> Note that there's a "round" property that indicates whether or not values in your plugin should be
     rounded to the nearest integer (compatible with TweenMax only). If you use the _tweens Array, populating
     it through the addTween() method, rounding will happen automatically (if necessary) in the 
     updateTweens() method, but if you don't use addTween() and prefer to manually calculate tween values
     in your changeFactor setter, just remember to accommodate the "round" flag if it makes sense in your plugin.</li>
     
   <li> If you need to run a block of code when the tween has finished, point the onComplete property to a
     method you created inside your plugin.</li>
 
   <li> If you need to run a function when the tween gets disabled, point the onDisable property to a
     method you created inside your plugin. Same for onEnable if you need to run code when a tween is
     enabled. (A tween gets disabled when it gets overwritten or finishes or when its timeline gets disabled)</li>
   
   <li> Please use the same naming convention as the rest of the plugins, like MySpecialPropertyNamePlugin.</li>
   
   <li> IMPORTANT: The plugin framework is brand new, so there is a chance that it will change slightly over time and 
     you may need to adjust your custom plugins if the framework changes. I'll try to minimize the changes,
     but I'd highly recommend getting a membership to Club GreenSock to make sure you get update notifications.
     See http://blog.greensock.com/club/ for details.</li>
 </ol>
 
 <b>Copyright 2010, GreenSock. All rights reserved.</b> This work is subject to the terms in <a href="http://www.greensock.com/terms_of_use.html">http://www.greensock.com/terms_of_use.html</a> or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership.
 
 <p></p>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#changeFactor">changeFactor</a> : Number<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">TweenPlugin</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#TweenPlugin()">TweenPlugin</a>()</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">TweenPlugin</td>
</tr>
</table>
</div>
<a name="constantSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Constants</div>
<table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#VERSION">VERSION</a> : Number = 1.31<div class="summaryTableDescription">[static]</div>
</td><td class="summaryTableOwnerCol">TweenPlugin</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="changeFactor"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">changeFactor</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>changeFactor:Number</code>&nbsp;&nbsp;[read-write]<span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get changeFactor():Number</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set changeFactor(value:Number):void</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="TweenPlugin()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">TweenPlugin</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function TweenPlugin()</code>
</div>
<a name="constantDetail"></a>
<div class="detailSectionHeader">Constant detail</div>
<a name="VERSION"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">VERSION</td><td class="detailHeaderType">constant</td>
</tr>
</table>
<div class="detailBody">
<code>public static const VERSION:Number = 1.31</code>
</div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
